package com.zf.yichat.utils.yunshangshuju;

import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.Map;

/**
 * @author idea
 * @date Created in 2020/11/12 12:44
 * @description
 */
public class YsBaseReqest {

    public Map<String, String> getSysParams() {
        Class c = this.getClass();
        Map<String, String> map = new HashMap();
        try {
            Field[] fs = c.getDeclaredFields();
            for (Field f : fs) {
                f.setAccessible(true);
                Object ob = f.get(this);
                if (null != ob) {
                    map.put(f.getName(), ob.toString());
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return map;
    }
}
